﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using WorkStation.Frameworks.EasyBus.Extensions;

namespace WorkStation.Frameworks.EasyBus.Repositories.Mongo
{
    public static class IBusExtensions
    {
        /// <summary>
        /// 设置消息记录仓储组件Mongo实现
        /// </summary>
        /// <param name="bus">总线对象</param>
        /// <param name="mongodbUrl">Mongo字串</param>
        /// <returns></returns>
        public static IBus UserMongodb(this IBus bus, string mongodbUrl) 
        {
            bus.SetHistoryCenterRepository(new HistoryCenterRepository(mongodbUrl));

            return bus;
        }
    }
}
